package com.sun.androidexerciseproject.function.model;

import android.text.TextUtils;

/**
 * Created by Administrator on 2017/12/6 0006.
 */

public class PayParam {
    private String mAppId;
    private String mApiVer;
    private String mPayType;
    private String mScene;
    private String mTerminal;
    private String mFmt;
    private String mCharset;
    private String mSgnType;
    private String mMerchOrdrNo;
    private String mTotOrdrAmt;
    private String mNoteUrl;
    private String mRtnUrl;
    private String mTimeStamp;
    private String mUsrName;
    private String mExtParm;
    private String mSgn;

    public String getAppId() {
        return mAppId;
    }

    public void setAppId(String appId) {
        mAppId = appId;
    }

    public String getApiVer() {
        return mApiVer;
    }

    public void setApiVer(String apiVer) {
        mApiVer = apiVer;
    }

    public String getPayType() {
        return mPayType;
    }

    public void setPayType(String payType) {
        mPayType = payType;
    }

    public String getScene() {
        return mScene;
    }

    public void setScene(String scene) {
        mScene = scene;
    }

    public String getTerminal() {
        return mTerminal;
    }

    public void setTerminal(String terminal) {
        mTerminal = terminal;
    }

    public String getFmt() {
        return mFmt;
    }

    public void setFmt(String fmt) {
        mFmt = fmt;
    }

    public String getCharset() {
        return mCharset;
    }

    public void setCharset(String charset) {
        mCharset = charset;
    }

    public String getSgnType() {
        return mSgnType;
    }

    public void setSgnType(String sgnType) {
        mSgnType = sgnType;
    }

    public String getMerchOrdrNo() {
        return mMerchOrdrNo;
    }

    public void setMerchOrdrNo(String merchOrdrNo) {
        mMerchOrdrNo = merchOrdrNo;
    }

    public String getTotOrdrAmt() {
        return mTotOrdrAmt;
    }

    public void setTotOrdrAmt(String totOrdrAmt) {
        mTotOrdrAmt = totOrdrAmt;
    }

    public String getNoteUrl() {
        return mNoteUrl;
    }

    public void setNoteUrl(String noteUrl) {
        mNoteUrl = noteUrl;
    }

    public String getRtnUrl() {
        return mRtnUrl;
    }

    public void setRtnUrl(String rtnUrl) {
        mRtnUrl = rtnUrl;
    }

    public String getTimeStamp() {
        return mTimeStamp;
    }

    public void setTimeStamp(String timeStamp) {
        mTimeStamp = timeStamp;
    }

    public String getUsrName() {
        return mUsrName;
    }

    public void setUsrName(String usrName) {
        mUsrName = usrName;
    }

    public String getExtParm() {
        return mExtParm;
    }

    public void setExtParm(String extParm) {
        mExtParm = extParm;
    }

    public String getSgn() {
        return mSgn;
    }

    public void setSgn(String sgn) {
        mSgn = sgn;
    }

    public static final class Builder {
        private String appId;
        private String apiVer;
        private String payType;
        private String scene;
        private String terminal;
        private String fmt;
        private String charset;
        private String sgnType;
        private String merchOrdrNo;
        private String totOrdrAmt;
        private String noteUrl;
        private String rtnUrl;
        private String timeStamp;
        private String usrName;
        private String extParm;
        private String sgn;

        public Builder setAppId(String appId) {
            this.appId = appId;
            return this;
        }

        public Builder setApiVer(String apiVer) {
            this.apiVer = apiVer;
            return this;
        }

        public Builder setPayType(String payType) {
            this.payType = payType;
            return this;
        }

        public Builder setScene(String scene) {
            this.scene = scene;
            return this;
        }

        public Builder setTerminal(String terminal) {
            this.terminal = terminal;
            return this;
        }

        public Builder setFmt(String fmt) {
            this.fmt = fmt;
            return this;
        }

        public Builder setCharset(String charset) {
            this.charset = charset;
            return this;
        }

        public Builder setSgnType(String sgnType) {
            this.sgnType = sgnType;
            return this;
        }

        public Builder setMerchOrdrNo(String merchOrdrNo) {
            this.merchOrdrNo = merchOrdrNo;
            return this;
        }

        public Builder setTotOrdrAmt(String totOrdrAmt) {
            this.totOrdrAmt = totOrdrAmt;
            return this;
        }

        public Builder setNoteUrl(String noteUrl) {
            this.noteUrl = noteUrl;
            return this;
        }

        public Builder setRtnUrl(String rtnUrl) {
            this.rtnUrl = rtnUrl;
            return this;
        }

        public Builder setTimeStamp(String timeStamp) {
            this.timeStamp = timeStamp;
            return this;
        }

        public Builder setUsrName(String usrName) {
            this.usrName = usrName;
            return this;
        }

        public Builder setExtParm(String extParm) {
            this.extParm = extParm;
            return this;
        }

        public Builder setSgn(String sgn) {
            this.sgn = sgn;
            return this;
        }

        public PayParam build() {
            PayParam payParam = new PayParam();
            if (!TextUtils.isEmpty(appId)) {
                payParam.setAppId(appId);
            }
            if (!TextUtils.isEmpty(apiVer)) {
                payParam.setApiVer(apiVer);
            }
            if (!TextUtils.isEmpty(payType)) {
                payParam.setPayType(payType);
            }
            if (!TextUtils.isEmpty(scene)) {
                payParam.setScene(scene);
            }
            if (!TextUtils.isEmpty(terminal)) {
                payParam.setTerminal(terminal);
            }
            if (!TextUtils.isEmpty(fmt)) {
                payParam.setFmt(fmt);
            }
            if (!TextUtils.isEmpty(charset)) {
                payParam.setCharset(charset);
            }
            if (!TextUtils.isEmpty(sgnType)) {
                payParam.setSgnType(sgnType);
            }
            if (!TextUtils.isEmpty(merchOrdrNo)) {
                payParam.setMerchOrdrNo(merchOrdrNo);
            }
            if (!TextUtils.isEmpty(totOrdrAmt)) {
                payParam.setTotOrdrAmt(totOrdrAmt);
            }
            if (!TextUtils.isEmpty(noteUrl)) {
                payParam.setNoteUrl(noteUrl);
            }
            if (!TextUtils.isEmpty(rtnUrl)) {
                payParam.setRtnUrl(rtnUrl);
            }
            if (!TextUtils.isEmpty(timeStamp)) {
                payParam.setTimeStamp(timeStamp);
            }
            if (!TextUtils.isEmpty(usrName)) {
                payParam.setUsrName(usrName);
            }
            if (!TextUtils.isEmpty(extParm)) {
                payParam.setExtParm(extParm);
            }
            if (!TextUtils.isEmpty(sgn)) {
                payParam.setSgn(sgn);
            }
            return payParam;
        }
    }
}
